import siderWrapper from 'components/SiderWrapper';
import pageWrapper from 'components/PageWrapper';
import Message from '../message/Message';
import Task from './task/Task';
import TaskDetail from './task/TaskDetail';

export default function Operator({ match }) {
  const items = [{
    path: `${match.url}/task`,
    iconType: 'task',
    text: '设备列表',
  }];
  const OperatorSider = siderWrapper(items);
  const routes = [{
    path: `${match.url}/task`,
    component: Task,
  }, {
    path: `${match.url}/taskDetail`,
    component: TaskDetail,
  }, {
    path: `${match.url}/message`,
    component: Message,
  }];
  return pageWrapper(OperatorSider, routes);
}
